<!doctype html>
<html>
<body>
<style>
hr{
margin:20px;
}
</style>

<p><a href=".">reload page</a></p>

{{#status}}
  <p style="color:red;"> Status of last operation is {{status}}</p>
{{/status}}
{{#message}}
  <p style="color:red;"> Extra message: {{message}}</p>
{{/message}}


<p>Add slot to DB:</p>
<p>addslot</p>
<form action="./addslot">
name: <input type="text" name="name" value="slotname"/>
html: <textarea name="html"  rows="5">
<h1>slot1</h1>

</textarea>
<input type="submit"/>
</form>

{{^listSlots}}
  No slots yet!
{{/listSlots}}
{{#listSlots?}}
  existing slots:
{{/listSlots?}}
{{#listSlots}}
  <p style="color:blue;">{{.}}</p>
{{/listSlots}}
<hr/>
<p>addTemplate to DB</p>
<form action="./addtemp">
name: <input type="text" name="name" value="tempname"/>
html:  
<textarea name="html"  rows="5">
<h1>slot1</h1>
{{=<% %>=}}
<b>{{slotname}}</b>
<%={{ }}=%>
{{ some kind of magic }}
</textarea>
<input type="submit"/>
</form>
{{^listTemplates}}
  No templates yet!
{{/listTemplates}}
{{#listTemplates?}}
  existing slots:
{{/listTemplates?}}
{{#listTemplates}}
  <p style="color:blue;">{{.}}</p>
{{/listTemplates}}

<hr/>
<p>Addslot to Template</p>
<form action="./addtemp/slot">
template name: <input type="text" name="name_temp" value="tempname"/>
slot name: <input type="text" name="name_slot" value="slotname"/>
<input type="submit"/>
</form>
<hr/>

<p>Add page to DB</p>
<form action="./addpage">
name: <input type="text" name="name" value="pagename"/>
<input type="submit"/>
</form>
{{^listPages}}
  No pages yet!
{{/listPages}}
{{#listPages?}}
  existing slots:
{{/listPages?}}
{{#listPages}}
  <p style="color:blue;">{{.}}</p>
{{/listPages}}

<hr/>


<p>Add template to page</p>
<form action="./addpage/temp">
page name: <input type="text" name="name_page" value="pagename"/>
template name: <input type="text" name="name_temp" value="tempname"/>
<input type="submit"/>
</form>
<hr/>

View page:
<form action="./viewpage">
template name: <input type="text" name="name_templ" value="tempname"/>
<input type="submit"/>
</form>
<hr/>
<hr/>

</body>
</html>